<script>
	export default {
		onLaunch: function() {
			console.log('App Launch')
		},
		onShow: function() {
			console.log('App Show')
			// uni.hideTabBar()
			uni.setStorageSync('tabValue', 0)
		},
		onHide: function() {
			console.log('App Hide')
		},

		created() {
			// this.nav()

		},
		methods: {
			nav() {
				const index = uni.getStorageSync('tabValue')

				switch (index) {
					case 0:
						uni.switchTab({
							url: '/pages/index/index'
						})
						break;
					case 1:
						uni.switchTab({
							url: '/pages/factionalism/factionalism'
						})
						break;
					case 2:
						uni.switchTab({
							url: '/pages/video-page/video-page'
						})
						break;
					case 3:
						uni.switchTab({
							url: '/pages/shopCar/shopCar'
						})
						break;
					case 4:
						uni.switchTab({
							url: '/pages/mine/mine'
						})
						break;
						// default:
						// 	uni.showToast({
						// 		title: "页面未开发"
						// 	})
				}
			}
		}
	}
</script>

<style lang="scss">
	/*每个页面公共css */

	// #ifdef MP-ALIPAY
	image {
		background-size: 100%;
	}

	// #endif

	.content {
		background-color: #f3f3f3;
		min-height: 100vh;
	}



	@import "@/uni_modules/uview-ui/index.scss";
</style>